"""
(c) 2011 Silvio Silva
Last revision: 2nd April 2011
"""
#!/usr/bin/env python
import os
from google.appengine.ext.webapp import template
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import util
import DataModels

class Help(webapp.RequestHandler):
    def get(self):
        try:
            u = DataModels.DataUser.get_current_user()
            template_values = { 'page_title' : 'Help',
                               'user_nickname' : u.user.nickname()
                               }
    
            path = os.path.join(os.path.dirname(__file__), 'templates/Help.html')
            self.response.out.write(template.render(path, template_values))
        except:
            path = os.path.join(os.path.dirname(__file__), 'templates/Exception.html')
            self.response.out.write(template.render(path, {}))

def main():
    application = webapp.WSGIApplication([
                                            ('/Help', Help)
                                         ],
                                         debug=True)
    util.run_wsgi_app(application)


if __name__ == '__main__':
    main()
